package com.ada.filter;

public class MethodInfo implements Comparable<MethodInfo>{
    public MethodInfo(String methodName, long duringTime, long endTime) {
        this.methodName = methodName;
        this.duringTime = duringTime;
        this.endTime = endTime;
    }

    String methodName;
    long duringTime;
    long endTime;

    @Override
    public int compareTo(MethodInfo o) {
        if(this.getDuringTime()>o.getDuringTime()){
            return 1;
        }else if(this.getDuringTime()<o.getDuringTime()){
            return -1;
        }else {
            return 0;
        }
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public long getDuringTime() {
        return duringTime;
    }

    public void setDuringTime(long duringTime) {
        this.duringTime = duringTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }
}
